<?php // 4.0
class index {
  function loaddata() {
    global $masterclass;

    $masterclass->loadmodule('customers');
    $masterclass->loadmodule('personnel');
    $masterclass->loadmodule('invoices');
    
    $masterclass->loadmodule('customers_wap',$masterclass->mainconfig['moduledirectory'].'customers/customers_wap.func.php');

    $masterclass->websiteconfig['title'].=' - '.$masterclass->allclasses['personnel']->fetch_personnelname($masterclass->site['personnelid']);
  return;
  }
  
  function savedata() {
    global $masterclass;
    
    foreach ($masterclass->sitevars['post_action'] as $postaction) {
      switch ($postaction) {
       case '':
       
      break;
      }
    }
     
  return;
  }


  function display() {
    global $masterclass;

    echo '<a href="'.$masterclass->mainconfig['dir'].$masterclass->mainconfig['htmldirectory'].'">Home</a> | <a href="'.$masterclass->mainconfig['dir'].$masterclass->mainconfig['htmldirectory'].'invoices/">Invoices</a> | <a href="'.$masterclass->mainconfig['dir'].$masterclass->mainconfig['htmldirectory'].'customers/">Customers</a><hr>';

    $strwhere=" (`active`='1') ";
    $listarray=$masterclass->fetch_records('customers','',$strwhere,' `updated` DESC, `first`,`last` ');
    
    $arrcustlist=$masterclass->allclasses['customers_wap']->display_customerlist($listarray,$masterclass->mainconfig['dir'].$masterclass->mainconfig['htmldirectory'].'customers/showcustomer.php?customerid=');
    echo $arrcustlist['load_list'];
  
  return;
  }
}
?>
